package jp.co.systemi.asp.workflow;

import javax.servlet.http.HttpServletRequest;

import java.util.logging.Logger;
import org.apache.wicket.RequestCycle;
import org.apache.wicket.protocol.http.servlet.ServletWebRequest;

public class Expire extends Super {
    static Logger syslog = Logger.getLogger(Expire.class.getName());
    static final String MSG_LABEL = "WSV001";

    public Expire() {
        RequestCycle cycle = getRequestCycle();
        HttpServletRequest request =
            ((ServletWebRequest) cycle.getRequest()).getHttpServletRequest();
        String ipAddress = request.getRemoteAddr();

        StringBuffer errmsg = new StringBuffer();
        errmsg.append("CLIENT_IP:" + ipAddress);
        syslog.fine(errmsg.toString());

        WorkflowSession session = (WorkflowSession) getSession();
        session.clearAuth();
        session.dirty();
    }
}
